<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet/less" type="text/css" href="statics/less/email/detail.less" />
<script src="statics/lib/extend/less.min.js"></script>
<script type="text/javascript" src="statics/modules/ckeditor/ckeditor.js"></script>
<script src="statics/lib/extend/tipso.min.js"></script>
<%--<script src="statics/layui.js"></script>--%>
<link rel="stylesheet" href="statics/lib/extend/tipso.min.css">
<style>
	@font-face {
		font-family: 'iconfont';  /* project id 2194848 */
		src: url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.eot');
		src: url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.eot?#iefix') format('embedded-opentype'),
		url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.woff2') format('woff2'),
		url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.woff') format('woff'),
		url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.ttf') format('truetype'),
		url('//at.alicdn.com/t/font_2194848_j8vnjthx4vk.svg#iconfont') format('svg');
	}
	.detailPage > .head{
		line-height:1;
	}
	.detailPage .ipt .items .item a.sk-btn{color:green !important;font-weight: bold;padding:0 5px;margin:0 2px;}
	.detailPage .ipt .items .item a.sk-btn:hover{color: red !important;cursor: pointer}
</style>
<script id="huifuMenu"  type="text/html">
	<div style="width: 130px;" class="dropdown">
		<p id="answer" onclick="answer(0)">回复</p>
		<p id="answerNo" onclick="answer(1)">回复（带全文）</p>
		<p id="answerYes" onclick="answer(2)">回复（带附件文）</p>
	</div>
</script>
<script id="qbhuifuMenu"  type="text/html">
	<div style="width: 160px;" class="dropdown">
		<p id="allanswer" onclick="allanswer(0)">全部回复</p>
		<p id="allanswerNo" onclick="allanswer(1)">全部回复（带全文）</p>
		<p id="allanswerYes" onclick="allanswer(2)">全部回复（带附件文）</p>
	</div>
</script>
<script id="zhuanfaMenu"  type="text/html">
	<div style="width: 130px;" class="dropdown">
		<p id="relay" onclick="relay(0)">转发</p>
		<p id="send" onclick="caogao(3)">再次编辑</p>
		<p id="mergeHaveAnswer" onclick="forward()">内部转发</p>
	</div>
</script>
<script id="yidongMenu"  type="text/html">
	<div style="display:flex;line-height: 2em;" align="center">
		<div style="width: 160px;" class="moremune">
			<div class="menu-item" >
				<a href="javascript:;" lay-event="emailsettings" onclick="changeEmailsClass(2)"><span class="">收件箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailsettings" onclick="changeEmailsClass(3)"><span class="">草稿箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(4)"><span class="">待发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(1)"><span class="">群发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(5)"><span class="">已发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(6)"><span class="">垃圾箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(7)"><span class="">回收箱</span></a>
			</div>
		</div>
		<div class="moremune">
			内部联系人箱
			<div class="showMoreBox" style="width: 130px;max-height: 150px;overflow: auto" id="moveEmailPeople">
			</div>
			<hr>
			自定义箱
			<div class="showMoreBox" style="width: 130px;max-height: 150px;overflow: auto" id="moveEmailBoxs">
			</div>
		</div>
	</div>
</script>
<div class="detailPage">
	<div hidden><input type="text" id="emailID">
		<input type="text" id="emailids"></div>
	<div class="head">
		<div class="bar">
			<%--			<button onclick="reUploadEmail()"> 重新下载 </button>--%>
			<a style="cursor: pointer" tooltip="回复" lay-dropdown="{template: 'huifuMenu'}"><i>&#xe609;</i></a>
			<a style="cursor: pointer" tooltip="全部回复" lay-dropdown="{template: 'qbhuifuMenu'}"><i>&#xe62d;</i></a>
			<a style="cursor: pointer" tooltip="转发" lay-dropdown="{template: 'zhuanfaMenu'}"><i>&#xe627;</i></a>
			<a style="cursor: pointer" tooltip="移动到" id="emailMove"><i>&#xe624;</i></a>
			<a style="cursor: pointer" tooltip="删除" onclick="deleteEmail()"><i>&#xe614;</i></a>
			<a style="cursor: pointer" tooltip="全屏" data-toggle="fullscreen"><i>&#xe70e;</i></a>
			<a style="cursor: pointer" tooltip="更多"><i>&#xe65b;</i></a>
			<a id="up"  style="cursor: pointer" tooltip="上一封"><i>&#xe87b;</i></a>
			<a id="down"  style="cursor: pointer" tooltip="下一封"><i>&#xe88f;</i></a>
		</div>
		<h3 id="subject" style="width:auto"></h3>  <!-- 邮件标题 -->
	</div>

	<div class="info" id="emailDate">
		<!--元数据-->
	</div>
	<hr>
	<div  class="ipt" id="ipt">
		<div class="items" id="adjuncts">

		</div>
	</div>
	<hr>
	<div class="content" id="content">

		<!--正文-->
	</div>
<%--	<textarea class="ckeditor"  id="textarea" name="financial.bz">	</textarea>--%>
<%--	<script type="text/javascript">--%>
<%--		CKEDITOR.replace('financial.bz', {--%>
<%--			height: 1000,--%>
<%--			// toolbar:[],--%>
<%--		});--%>
<%--	</script>--%>
</div>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/BasicData/email/detail.js"></script>
<script>
	$("#up").click(function () {
		getUpOrDownEmail("up");
	})
	$("#down").click(function () {
		getUpOrDownEmail("down");
	})
	$(function(){
		$("a[tooltip]").each(function(){
			var t = $(this).attr('tooltip');
			$(this).tooltip({
				text:t
			});
		});
	});
	$(function(){
		var types=getQueryVariable("types")

		$("a[tooltip]").each(function(){
			var t = $(this).attr('tooltip');
			$(this).tooltip({
				text:t
			});
		});
		if(types == 2){
			$(".bar").append('<a style="cursor: pointer" data-toggle="guanbi" tooltip="下一封"><i class="layui-icon">&#x1006;</i></a>');
		}
		//全屏事件 --star
		$(document).on('click', "[data-toggle='fullscreen']", function () {
			var doc = document.documentElement;
			if ($(document.body).hasClass("full-screen")) {
				$(document.body).removeClass("full-screen");
				document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen();
			} else {
				$(document.body).addClass("full-screen");
				doc.requestFullscreen ? doc.requestFullscreen() : doc.mozRequestFullScreen ? doc.mozRequestFullScreen() : doc.webkitRequestFullscreen ? doc.webkitRequestFullscreen() : doc.msRequestFullscreen && doc.msRequestFullscreen();
			}
		});

		$(document).on('click', "[data-toggle='guanbi']", function () {
			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			parent.layer.close(index);
		});

	});
</script>


